package com.yunji.storage.service.impl;

import com.yunji.storage.bo.StorageTicketListQueryBO;
import com.yunji.storage.bo.StorageTicketSelectQueryBO;
import com.yunji.storage.dao.IStorageTicketDao;
import com.yunji.storage.domain.StorageTicketDO;
import com.yunji.storage.mapper.StorageTicketMapper;
import com.yunji.storage.service.IStorageTicketService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Project: yunji-coffee
 * @Package: com.yunji.storage.service.impl
 * @Title: StorageTicketServiceImpl
 * <p>
 * History:
 * Date                     Version     Author          Summary
 * ============================================================
 * 2024-08-16 14:02:47      V1.0        HuaAo       新建类
 */
@Service
public class StorageTicketServiceImpl implements IStorageTicketService {

    @Resource
    StorageTicketMapper storageTicketMapper;

    @Resource
    IStorageTicketDao storageTicketDao;

    @Override
    public boolean create(StorageTicketDO storageTicket) {
        return storageTicketDao.save(storageTicket);
    }

    @Override
    public StorageTicketDO select(Long ticketId) {
        return storageTicketDao.getById(ticketId);
    }

    @Override
    public StorageTicketDO select(StorageTicketSelectQueryBO bo) {
        return storageTicketDao.select(bo);
    }

    @Override
    public boolean updateStorageTicket(StorageTicketDO storageTicket) {
        return storageTicketDao.updateById(storageTicket);
    }

    @Override
    public boolean delete(Long... ticketIds) {
        return storageTicketDao.delete(ticketIds);
    }

    @Override
    public List<StorageTicketDO> search(StorageTicketListQueryBO bo) {
        return storageTicketDao.search(bo);
    }

}